auto merge of #757 : alexcrichton/cargo/issue-743, r=brson
authorbors <bors@rust-lang.org>
Mon, 27 Oct 2014 22:33:38 +0000 (22:33 +0000)
committerbors <bors@rust-lang.org>
Mon, 27 Oct 2014 22:33:38 +0000 (22:33 +0000)
Closes #743

1  2 
tests/test_cargo_compile.rs

index 58da5ca0eadcf29da8413971f974724e83c9f821,6de108de407146faa2481d1476c281abbc556fd6..9a592f6777f5ea5095d0a654ba0ad6c5603d860a
@@@ -1683,5 -1683,30 +1683,31 @@@ test!(ignore_bad_directories 
      fs::mkdir(&foo.root().join("tmp"), io::USER_EXEC ^ io::USER_EXEC).unwrap();
      assert_that(foo.process(cargo_dir().join("cargo")).arg("build"),
                  execs().with_status(0));
 +    fs::chmod(&foo.root().join("tmp"), io::USER_DIR).unwrap();
  })
+ test!(bad_cargo_config {
+     let foo = project("foo")
+         .file("Cargo.toml", r#"
+             [package]
+             name = "foo"
+             version = "0.0.0"
+             authors = []
+         "#)
+         .file("src/lib.rs", "")
+         .file(".cargo/config", r#"
+               this is not valid toml
+         "#);
+     assert_that(foo.cargo_process("build").arg("-v"),
+                 execs().with_status(101).with_stderr("\
+ Couldn't load Cargo configuration
+ Caused by:
+   could not parse Toml manifest; path=[..]
+ Caused by:
+   could not parse input TOML
+ [..].cargo[..]config:2:20-2:21 expected `=`, but found `i`
+ "));
+ })